import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.junit.Test;

public class DivideWeekTest {

	@Test
	public void test() {
		DivideWeek dw = new DivideWeek(2017,2);
		List<List<Integer>> t1 = new ArrayList<List<Integer>>();
		t1.add(Arrays.asList(new Integer[] {1,2,3,4}));
		t1.add(Arrays.asList(new Integer[] {5,6,7,8,9,10,11}));
		t1.add(Arrays.asList(new Integer[] {12,13,14,15,16,17,18}));
		t1.add(Arrays.asList(new Integer[] {19,20,21,22,23,24,25,26,27,28}));
		List<List<Integer>> r1 = dw.divide();
		assertEquals(t1,r1);
		
		
		DivideWeek dw2 = new DivideWeek(2017,9);
		List<List<Integer>> t2 = new ArrayList<List<Integer>>();
		t2.add(Arrays.asList(new Integer[] {1,2,3,4,5,6,7,8,9}));
		t2.add(Arrays.asList(new Integer[] {10,11,12,13,14,15,16}));
		t2.add(Arrays.asList(new Integer[] {17,18,19,20,21,22,23}));
		t2.add(Arrays.asList(new Integer[] {24,25,26,27,28,29,30}));
		List<List<Integer>> r2 = dw2.divide();
		assertEquals(t2,r2);
		
		DivideWeek dw3 = new DivideWeek(2017,11);
		List<List<Integer>> t3 = new ArrayList<List<Integer>>();
		t3.add(Arrays.asList(new Integer[] {1,2,3,4,5,6,7,8,9,10,11}));
		t3.add(Arrays.asList(new Integer[] {12,13,14,15,16,17,18}));
		t3.add(Arrays.asList(new Integer[] {19,20,21,22,23,24,25}));
		t3.add(Arrays.asList(new Integer[] {26,27,28,29,30}));
		List<List<Integer>> r3 = dw3.divide();
		assertEquals(t3,r3);
	}

}
